package chapter05;

public class Test03_throws {
    public static void main(String[] args) {
        //如果显示的抛出异常 可以直接抓取异常
        try {
            System.out.println(divide(10,0));
        }catch (Exception e){
            System.out.println(e.getMessage());
        }
    }
    //显示抛出可能出现的异常
    public static int divide(int a,int b) throws Exception{
        return a/b;
    }
}
